package com.stylefeng.guns.modular.pay.model;

import com.baomidou.mybatisplus.enums.IdType;
import java.math.BigDecimal;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;

import java.beans.Transient;
import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author stylefeng
 * @since 2018-08-24
 */
@TableName("pay_account_history")
public class AccountHistory extends Model<AccountHistory> {

    private static final long serialVersionUID = 1L;

    /**
     * ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    /**
     * VERSION
     */
    private Integer version;
    /**
     * 创建时间
     */
    @TableField("create_time")
    private Date createTime;
    /**
     * 商户号
     */
    @TableField("mch_no")
    private String mchNo;
    /**
     * 账户编号
     */
    @TableField("account_no")
    private String accountNo;
    /**
     * 账户类型
     */
    @TableField("accout_type")
    private String accoutType;
    /**
     * 交易类型(100-线上支付 101-线下充值 102线上代付 103线下体现)
     */
    @TableField("trans_type")
    private Integer transType;
    /**
     * 交易流水号
     */
    @TableField("trans_flow_no")
    private String transFlowNo;
    /**
     * 交易时间
     */
    @TableField("trans_time")
    private Date transTime;
    /**
     * 入账时间
     */
    @TableField("accounting_time")
    private Date accountingTime;
    private BigDecimal amount;
    /**
     * 上次余额
     */
    @TableField("last_balance")
    private BigDecimal lastBalance;
    private BigDecimal banlance;
    /**
     * 资金方向，321:减少 123:增加
     */
    @TableField("fund_direction")
    private Integer fundDirection;
    /**
     * 是否允许结算
     */
    @TableField("is_allow_sett")
    private Integer isAllowSett;
    /**
     * 是否完成结算
     */
    @TableField("is_complete_sett")
    private Integer isCompleteSett;
    /**
     * 描述
     */
    private String remark;
    /**
     * 风险预存期天数
     */
    @TableField("risk_day")
    private Integer riskDay;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Integer getVersion() {
        return version;
    }

    public void setVersion(Integer version) {
        this.version = version;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getMchNo() {
        return mchNo;
    }

    public void setMchNo(String mchNo) {
        this.mchNo = mchNo;
    }

    public String getAccountNo() {
        return accountNo;
    }

    public void setAccountNo(String accountNo) {
        this.accountNo = accountNo;
    }

    public String getAccoutType() {
        return accoutType;
    }

    public void setAccoutType(String accoutType) {
        this.accoutType = accoutType;
    }

    public Integer getTransType() {
        return transType;
    }

    public void setTransType(Integer transType) {
        this.transType = transType;
    }

    public String getTransFlowNo() {
        return transFlowNo;
    }

    public void setTransFlowNo(String transFlowNo) {
        this.transFlowNo = transFlowNo;
    }

    public Date getTransTime() {
        return transTime;
    }

    public void setTransTime(Date transTime) {
        this.transTime = transTime;
    }

    public Date getAccountingTime() {
        return accountingTime;
    }

    public void setAccountingTime(Date accountingTime) {
        this.accountingTime = accountingTime;
    }

    public BigDecimal getAmount() {
        return amount;
    }

    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    public BigDecimal getLastBalance() {
        return lastBalance;
    }

    public void setLastBalance(BigDecimal lastBalance) {
        this.lastBalance = lastBalance;
    }

    public BigDecimal getBanlance() {
        return banlance;
    }

    public void setBanlance(BigDecimal banlance) {
        this.banlance = banlance;
    }

    public Integer getFundDirection() {
        return fundDirection;
    }

    public void setFundDirection(Integer fundDirection) {
        this.fundDirection = fundDirection;
    }

    public Integer getIsAllowSett() {
        return isAllowSett;
    }

    public void setIsAllowSett(Integer isAllowSett) {
        this.isAllowSett = isAllowSett;
    }

    public Integer getIsCompleteSett() {
        return isCompleteSett;
    }

    public void setIsCompleteSett(Integer isCompleteSett) {
        this.isCompleteSett = isCompleteSett;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Integer getRiskDay() {
        return riskDay;
    }

    public void setRiskDay(Integer riskDay) {
        this.riskDay = riskDay;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }
    
    //业务查询字段
    private String beginTime;
    private String endTime;
   
    @Transient
    public String getBeginTime() {
		return beginTime;
	}

	public void setBeginTime(String beginTime) {
		this.beginTime = beginTime;
	}
	@Transient
	public String getEndTime() {
		return endTime;
	}

	public void setEndTime(String endTime) {
		this.endTime = endTime;
	}

    @Override
    public String toString() {
        return "AccountHistory{" +
        "id=" + id +
        ", version=" + version +
        ", createTime=" + createTime +
        ", mchNo=" + mchNo +
        ", accountNo=" + accountNo +
        ", accoutType=" + accoutType +
        ", transType=" + transType +
        ", transFlowNo=" + transFlowNo +
        ", transTime=" + transTime +
        ", accountingTime=" + accountingTime +
        ", amount=" + amount +
        ", lastBalance=" + lastBalance +
        ", banlance=" + banlance +
        ", fundDirection=" + fundDirection +
        ", isAllowSett=" + isAllowSett +
        ", isCompleteSett=" + isCompleteSett +
        ", remark=" + remark +
        ", riskDay=" + riskDay +
        "}";
    }
}
